3.154 \(\int \frac {(c+a^2 c x^2) \tan ^{-1}(a x)}{x^2} \, dx\)

Optimal. Leaf size=40 \[ -a c \log \left (a^2 x^2+1\right )+a^2 c x \tan ^{-1}(a x)+a c \log (x)-\frac {c \tan ^{-1}(a x)}{x} \]

[Out]

-c*arctan(a*x)/x+a^2*c*x*arctan(a*x)+a*c*ln(x)-a*c*ln(a^2*x^2+1)

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 40, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 8, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.444, Rules used = {4950, 4852, 266, 36, 29, 31, 4846, 260} \[ -a c \log \left (a^2 x^2+1\right )+a^2 c x \tan ^{-1}(a x)+a c \log (x)-\frac {c \tan ^{-1}(a x)}{x} \]

Antiderivative was successfully verified.

[In]

Int[((c + a^2*c*x^2)*ArcTan[a*x])/x^2,x]

[Out]

-((c*ArcTan[a*x])/x) + a^2*c*x*ArcTan[a*x] + a*c*Log[x] - a*c*Log[1 + a^2*x^2]

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rule 266

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 4846

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*ArcTan[c*x])^p, x] - Dist[b*c*p, Int[
(x*(a + b*ArcTan[c*x])^(p - 1))/(1 + c^2*x^2), x], x] /; FreeQ[{a, b, c}, x] && IGtQ[p, 0]

Rule 4852

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*ArcTa
n[c*x])^p)/(d*(m + 1)), x] - Dist[(b*c*p)/(d*(m + 1)), Int[((d*x)^(m + 1)*(a + b*ArcTan[c*x])^(p - 1))/(1 + c^
2*x^2), x], x] /; FreeQ[{a, b, c, d, m}, x] && IGtQ[p, 0] && (EqQ[p, 1] || IntegerQ[m]) && NeQ[m, -1]

Rule 4950

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*((f_.)*(x_))^(m_)*((d_) + (e_.)*(x_)^2)^(q_.), x_Symbol] :> Dist[
d, Int[(f*x)^m*(d + e*x^2)^(q - 1)*(a + b*ArcTan[c*x])^p, x], x] + Dist[(c^2*d)/f^2, Int[(f*x)^(m + 2)*(d + e*
x^2)^(q - 1)*(a + b*ArcTan[c*x])^p, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && EqQ[e, c^2*d] && GtQ[q, 0] &&
 IGtQ[p, 0] && (RationalQ[m] || (EqQ[p, 1] && IntegerQ[q]))

Rubi steps

\begin {align*} \int \frac {\left (c+a^2 c x^2\right ) \tan ^{-1}(a x)}{x^2} \, dx &=c \int \frac {\tan ^{-1}(a x)}{x^2} \, dx+\left (a^2 c\right ) \int \tan ^{-1}(a x) \, dx\\ &=-\frac {c \tan ^{-1}(a x)}{x}+a^2 c x \tan ^{-1}(a x)+(a c) \int \frac {1}{x \left (1+a^2 x^2\right )} \, dx-\left (a^3 c\right ) \int \frac {x}{1+a^2 x^2} \, dx\\ &=-\frac {c \tan ^{-1}(a x)}{x}+a^2 c x \tan ^{-1}(a x)-\frac {1}{2} a c \log \left (1+a^2 x^2\right )+\frac {1}{2} (a c) \operatorname {Subst}\left (\int \frac {1}{x \left (1+a^2 x\right )} \, dx,x,x^2\right )\\ &=-\frac {c \tan ^{-1}(a x)}{x}+a^2 c x \tan ^{-1}(a x)-\frac {1}{2} a c \log \left (1+a^2 x^2\right )+\frac {1}{2} (a c) \operatorname {Subst}\left (\int \frac {1}{x} \, dx,x,x^2\right )-\frac {1}{2} \left (a^3 c\right ) \operatorname {Subst}\left (\int \frac {1}{1+a^2 x} \, dx,x,x^2\right )\\ &=-\frac {c \tan ^{-1}(a x)}{x}+a^2 c x \tan ^{-1}(a x)+a c \log (x)-a c \log \left (1+a^2 x^2\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 40, normalized size = 1.00 \[ -a c \log \left (a^2 x^2+1\right )+a^2 c x \tan ^{-1}(a x)+a c \log (x)-\frac {c \tan ^{-1}(a x)}{x} \]

Antiderivative was successfully verified.

[In]

Integrate[((c + a^2*c*x^2)*ArcTan[a*x])/x^2,x]

[Out]

-((c*ArcTan[a*x])/x) + a^2*c*x*ArcTan[a*x] + a*c*Log[x] - a*c*Log[1 + a^2*x^2]

________________________________________________________________________________________

fricas [A]  time = 0.48, size = 45, normalized size = 1.12 \[ -\frac {a c x \log \left (a^{2} x^{2} + 1\right ) - a c x \log \relax (x) - {\left (a^{2} c x^{2} - c\right )} \arctan \left (a x\right )}{x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a^2*c*x^2+c)*arctan(a*x)/x^2,x, algorithm="fricas")

[Out]

-(a*c*x*log(a^2*x^2 + 1) - a*c*x*log(x) - (a^2*c*x^2 - c)*arctan(a*x))/x

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \mathit {sage}_{0} x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a^2*c*x^2+c)*arctan(a*x)/x^2,x, algorithm="giac")

[Out]

sage0*x

________________________________________________________________________________________

maple [A]  time = 0.03, size = 43, normalized size = 1.08 \[ a^{2} c x \arctan \left (a x \right )-\frac {c \arctan \left (a x \right )}{x}-a c \ln \left (a^{2} x^{2}+1\right )+a c \ln \left (a x \right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a^2*c*x^2+c)*arctan(a*x)/x^2,x)

[Out]

a^2*c*x*arctan(a*x)-c*arctan(a*x)/x-a*c*ln(a^2*x^2+1)+a*c*ln(a*x)

________________________________________________________________________________________

maxima [A]  time = 0.33, size = 40, normalized size = 1.00 \[ -{\left (c \log \left (a^{2} x^{2} + 1\right ) - c \log \relax (x)\right )} a + {\left (a^{2} c x - \frac {c}{x}\right )} \arctan \left (a x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a^2*c*x^2+c)*arctan(a*x)/x^2,x, algorithm="maxima")

[Out]

-(c*log(a^2*x^2 + 1) - c*log(x))*a + (a^2*c*x - c/x)*arctan(a*x)

________________________________________________________________________________________

mupad [B]  time = 0.16, size = 42, normalized size = 1.05 \[ a^2\,c\,x\,\mathrm {atan}\left (a\,x\right )-\frac {c\,\mathrm {atan}\left (a\,x\right )}{x}-c\,\left (a\,\ln \left (a^2\,x^2+1\right )-a\,\ln \relax (x)\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((atan(a*x)*(c + a^2*c*x^2))/x^2,x)

[Out]

a^2*c*x*atan(a*x) - (c*atan(a*x))/x - c*(a*log(a^2*x^2 + 1) - a*log(x))

________________________________________________________________________________________

sympy [A]  time = 0.75, size = 41, normalized size = 1.02 \[ \begin {cases} a^{2} c x \operatorname {atan}{\left (a x \right )} + a c \log {\relax (x )} - a c \log {\left (x^{2} + \frac {1}{a^{2}} \right )} - \frac {c \operatorname {atan}{\left (a x \right )}}{x} & \text {for}\: a \neq 0 \\0 & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a**2*c*x**2+c)*atan(a*x)/x**2,x)

[Out]

Piecewise((a**2*c*x*atan(a*x) + a*c*log(x) - a*c*log(x**2 + a**(-2)) - c*atan(a*x)/x, Ne(a, 0)), (0, True))

________________________________________________________________________________________